const state = {
  cardState: -2 // 卡信息
}

const getters = {
  cardState: state => state.cardState
}

const actions = {
  fetchCardState: ({ commit, state }, text) => {
    commit('updateCardState', text)
  }
}

const mutations = {
  updateCardState: (state, payload) => {
    state.cardState = payload
  }
}

export default {
  state,
  getters,
  actions,
  mutations
}
